<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
	<script type="text/javascript" src="${ctx}/js/jquery.ui.combobox.js"></script>
	<script type="text/javascript" src="${ctx}/js/record_manage.js"></script>
<style>
	.ui-combobox {
		position: relative;
		display: inline-block;
	}
	.ui-combobox-toggle {
		position: absolute;
		top: 0;
		bottom: 0;
		margin-left: -1px;
		padding: 0;
		/* adjust styles for IE 6/7 */
		*height: 1.7em;
		*top: 0.1em;
	}
	td li{
	    cursor: pointer !important;
	    float: left !important;
	    list-style: none outside none !important;
	    margin: 2px !important;
	    padding: 4px 0 !important;
	    position: relative !important;
	}
</style>
</head>

<body class="blue">
<div class="right_box" id="record_body">
	<div id="record_accordion">
		<h3><a>&nbsp;查询单据：&nbsp;</a></h3>
		<div>
			<table width="100%" border="0" class="searchtable">
				<tr>
					<td>
						<div id="searchState" style="width:445px">状态：
							<input type="radio" id="sState1" name="sState" checked="checked" value="-1"/><label for="sState1">全部</label>
							<input type="radio" id="sState2" name="sState" value="-2"/><label for="sState2">未完成</label>
							<input type="radio" id="sState3" name="sState" value="1"/><label for="sState3">处理中</label>
							<input type="radio" id="sState4" name="sState" value="2"/><label for="sState4">转交</label>
							<input type="radio" id="sState5" name="sState" value="3"/><label for="sState5">处理完毕</label>
							<input type="radio" id="sState6" name="sState" value="4"/><label for="sState6">疑难不能解决</label>
						</div>
					</td>
					<td>
						<div style="display:inline-block;width:370px;">
							&nbsp;&nbsp;日期：
							<input type="text" id="sBeginDate" readonly="readonly" style="width:30%"/>
							<span onclick="$('#sBeginDate').datepicker('show')" class="ui-state-default ui-corner-all ico_outer"><span class="ui-icon ui-icon-calendar ico_inner">&nbsp;</span></span>
							至<input type="text" id="sEndDate" readonly="readonly" style="width:30%"/>
							<span onclick="$('#sEndDate').datepicker('show')" class="ui-state-default ui-corner-all ico_outer"><span class="ui-icon ui-icon-calendar ico_inner">&nbsp;</span></span>
						</div>
					</td>
					<td>&nbsp;&nbsp;提交人：<input type="text" id="schSubmitPerson" style="width:70%"/></td>
				</tr>
				<tr>
					<td>
						<div id="searchIsBad" style="width:445px">合理：
							<input type="radio" id="schIsBad1" name="schIsBad" checked="checked" value="-1"/><label for="schIsBad1">全部</label>
							<input type="radio" id="schIsBad2" name="schIsBad" value="1"/><label for="schIsBad2">不合理工单</label>
							<input type="radio" id="schIsBad3" name="schIsBad" value="0"/><label for="schIsBad3">合理工单</label>
						</div>
	   				</td>
					<td style="width:45%">&nbsp;&nbsp;公司：<input type="text" id="schCompany" style="width:70%"/></td>
					<td style="width:29%">&nbsp;&nbsp;<button id="searchBt">搜索</button>&nbsp;&nbsp;<button id="csvBt">导出csv</button></td>
				</tr>
		    </table>
	    </div>
		<h3><a>&nbsp;录入单据：<span id="nowTime"></span>&nbsp;</a></h3>
		<div>
			<form id="recordForm">
				<table width="100%" border="0">
					<tr>
						<td class="right" nowrap="nowrap">联系人：</td>
						<td><input name="pojo.contact" style="width:90%"/></td>
						<td class="right" nowrap="nowrap">电话：</td>
						<td><input name="pojo.phone" style="width:90%"/></td>
					</tr>
					<tr>
						<td class="right" nowrap="nowrap">公司：</td>
						<td colspan="3"><input name="pojo.company" style="width:90%"/></td>
					</tr>
					<tr>
						<td class="right" nowrap="nowrap">来源：</td>
						<td><div id="iSource"></div></td>
						<td class="right" nowrap="nowrap">故障类型：</td>
						<td>
							<ul style="display:inline"><li class="ui-state-default ui-corner-all" onmouseover="$(this).toggleClass('ui-state-hover')" onmouseout="$(this).toggleClass('ui-state-hover')"  onclick='recordManage.sourceMake();'><span class="ui-icon ui-icon-refresh" style="width:17px;height:13px"></span></li></ul>
							<select id="errorTypeId" name="errorTypeId"></select>
						</td>
					</tr>
					<tr>
						<td class="right" nowrap="nowrap">提交人：</td>
						<td><input name="pojo.submitPerson" style="width:90%"/></td>
						<td class="right" nowrap="nowrap">合理性：</td>
						<td>
							<div id="iIsBad" style="width:445px">
								<input type="radio" id="iIsBad1" name="iIsBadRadio" checked="checked" value="0"/><label for="iIsBad1">合理</label>
								<input type="radio" id="iIsBad2" name="iIsBadRadio" value="1"/><label for="iIsBad2">不合理</label>
							</div>
						</td>
					</tr>
					<tr>
						<td class="right" nowrap="nowrap">状态：</td>
						<td colspan="3">
							<div id="iState" style="width:90%">
								<input type="radio" id="iState1" name="iStateRadio" checked="checked" value="1"/><label for="iState1">处理中</label>
								<input type="radio" id="iState2" name="iStateRadio" value="3"/><label for="iState2">处理完毕</label>
								<input type="radio" id="iState3" name="iStateRadio" value="4"/><label for="iState3">疑难不能解决</label>
							</div>
						</td>
					</tr>
					<tr>
						<td class="right" nowrap="nowrap">故障：</td>
						<td colspan="3"><textarea name="pojo.problemDesc" style="width:90%;height:70px;overflow:auto"></textarea></td>
					</tr>
					<tr>
						<td class="right" nowrap="nowrap">url：</td>
						<td colspan="3"><input name="pojo.linkUrl" style="width:90%"/></td>
					</tr>
					<tr>
						<td class="right" nowrap="nowrap">处理意见：</td>
						<td colspan="3"><textarea name="dealIdea" style="width:90%;height:70px;overflow:auto"></textarea></td>
					</tr>
					<tr>
						<td class="right"></td>
						<td colspan="3" class="right"><button type="button" id="insert_submit">保存</button>&nbsp;&nbsp;&nbsp;&nbsp;<button type="button" id="insert_reset">清空</button></td>
					</tr>
			    </table>
			</form>
		</div>
	</div>
	<div class="split">&nbsp;</div>
	<div id="list_table">
		<h3><a>&nbsp;<span id="countp_record"></span>&nbsp;</a></h3>
		<div>
			<table width="99%" border="0" cellpadding="0" cellspacing="0" class="tablelist">
				<thead>
					<tr class="border-in">
						<th>录入时间</th>
						<th>提交人</th>
						<th>来源</th>
						<th>故障类型</th>
						<th>公司</th>
						<th>故障</th>
						<th>合理性</th>
						<th>状态</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody id="databody_record"></tbody>
			</table>
		</div>
	</div>
</div>
	<div id="searchDescDiv" title="故障详细" class="none4win"><textarea id="searchDescDetail" style="width:98%;height:90%;overflow:auto" readonly="readonly"></textarea></div>
	<div id="editDiv" title="修改工单" class="none4win">
		<input type="hidden" name="pojo.id"/>
		<input type="hidden" name="pojo.receieveDate"/>
		<input type="hidden" name="pojo.receieveDateStr"/>
		<table width="100%" border="0">
			<tr>
				<td class="right" nowrap="nowrap">联系人：</td>
				<td><input name="pojo.contact" style="width:90%"/></td>
				<td class="right" nowrap="nowrap">电话：</td>
				<td><input name="pojo.phone" style="width:90%"/></td>
			</tr>
			<tr>
				<td class="right" nowrap="nowrap">公司：</td>
				<td colspan="3"><input name="pojo.company" style="width:90%"/></td>
			</tr>
			<tr>
				<td class="right" nowrap="nowrap">来源：</td>
				<td><div id="uSource"></div></td>
				<td class="right" nowrap="nowrap">故障类型：</td>
				<td id="uErrorTypeTd"></td>
			</tr>
			<tr>
				<td class="right" nowrap="nowrap">提交人：</td>
				<td><input name="pojo.submitPerson" style="width:90%"/></td>
				<td class="right" nowrap="nowrap">合理性：</td>
				<td>
					<div id="uIsBad" style="width:445px"></div>
				</td>
			</tr>
			<tr>
				<td class="right" nowrap="nowrap">故障：</td>
				<td colspan="3"><textarea name="pojo.problemDesc" style="width:90%;height:70px;overflow:auto"></textarea></td>
			</tr>
			<tr>
				<td class="right" nowrap="nowrap">url：</td>
				<td colspan="3"><input name="pojo.linkUrl" style="width:90%"/></td>
			</tr>
			<tr>
				<td class="right" nowrap="nowrap">工单状态：</td>
				<td colspan="3"><div id="uState" style="width:90%"></div></td>
			</tr>
			<tr>
				<td class="right" nowrap="nowrap">处理意见：</td>
				<td colspan="3"><textarea name="dealIdea" style="width:90%;height:70px;overflow:auto"></textarea></td>
			</tr>
			<tr>
				<td class="right" nowrap="nowrap">&nbsp;</td>
				<td colspan="4"><input type="checkbox" value="1" name="needsFinishDate" />更新已完结单据的完成时间</td>
			</tr>
	    </table>
	    <div class="split">&nbsp;</div>
		<div id="dealIdea_table">
			<h3><a>&nbsp;历史处理意见 <span id="countIdeas"></span>&nbsp;</a></h3>
			<div>
				<table width="99%" border="0" cellpadding="0" cellspacing="0" class="tablelist">
					<thead>
						<tr class="border-in">
							<th>时间</th>
							<th>意见</th>
						</tr>
					</thead>
					<tbody id="ideaBody"></tbody>
				</table>
			</div>
		</div>
	</div>
</body>
</html>
